package com.cnvai.cms.javabean.model;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

public class CmsChannelExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public CmsChannelExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andCnnidIsNull() {
            addCriterion("CNNID is null");
            return (Criteria) this;
        }

        public Criteria andCnnidIsNotNull() {
            addCriterion("CNNID is not null");
            return (Criteria) this;
        }

        public Criteria andCnnidEqualTo(BigDecimal value) {
            addCriterion("CNNID =", value, "cnnid");
            return (Criteria) this;
        }

        public Criteria andCnnidNotEqualTo(BigDecimal value) {
            addCriterion("CNNID <>", value, "cnnid");
            return (Criteria) this;
        }

        public Criteria andCnnidGreaterThan(BigDecimal value) {
            addCriterion("CNNID >", value, "cnnid");
            return (Criteria) this;
        }

        public Criteria andCnnidGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("CNNID >=", value, "cnnid");
            return (Criteria) this;
        }

        public Criteria andCnnidLessThan(BigDecimal value) {
            addCriterion("CNNID <", value, "cnnid");
            return (Criteria) this;
        }

        public Criteria andCnnidLessThanOrEqualTo(BigDecimal value) {
            addCriterion("CNNID <=", value, "cnnid");
            return (Criteria) this;
        }

        public Criteria andCnnidIn(List<BigDecimal> values) {
            addCriterion("CNNID in", values, "cnnid");
            return (Criteria) this;
        }

        public Criteria andCnnidNotIn(List<BigDecimal> values) {
            addCriterion("CNNID not in", values, "cnnid");
            return (Criteria) this;
        }

        public Criteria andCnnidBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("CNNID between", value1, value2, "cnnid");
            return (Criteria) this;
        }

        public Criteria andCnnidNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("CNNID not between", value1, value2, "cnnid");
            return (Criteria) this;
        }

        public Criteria andCnncodeIsNull() {
            addCriterion("CNNCODE is null");
            return (Criteria) this;
        }

        public Criteria andCnncodeIsNotNull() {
            addCriterion("CNNCODE is not null");
            return (Criteria) this;
        }

        public Criteria andCnncodeEqualTo(String value) {
            addCriterion("CNNCODE =", value, "cnncode");
            return (Criteria) this;
        }

        public Criteria andCnncodeNotEqualTo(String value) {
            addCriterion("CNNCODE <>", value, "cnncode");
            return (Criteria) this;
        }

        public Criteria andCnncodeGreaterThan(String value) {
            addCriterion("CNNCODE >", value, "cnncode");
            return (Criteria) this;
        }

        public Criteria andCnncodeGreaterThanOrEqualTo(String value) {
            addCriterion("CNNCODE >=", value, "cnncode");
            return (Criteria) this;
        }

        public Criteria andCnncodeLessThan(String value) {
            addCriterion("CNNCODE <", value, "cnncode");
            return (Criteria) this;
        }

        public Criteria andCnncodeLessThanOrEqualTo(String value) {
            addCriterion("CNNCODE <=", value, "cnncode");
            return (Criteria) this;
        }

        public Criteria andCnncodeLike(String value) {
            addCriterion("CNNCODE like", value, "cnncode");
            return (Criteria) this;
        }

        public Criteria andCnncodeNotLike(String value) {
            addCriterion("CNNCODE not like", value, "cnncode");
            return (Criteria) this;
        }

        public Criteria andCnncodeIn(List<String> values) {
            addCriterion("CNNCODE in", values, "cnncode");
            return (Criteria) this;
        }

        public Criteria andCnncodeNotIn(List<String> values) {
            addCriterion("CNNCODE not in", values, "cnncode");
            return (Criteria) this;
        }

        public Criteria andCnncodeBetween(String value1, String value2) {
            addCriterion("CNNCODE between", value1, value2, "cnncode");
            return (Criteria) this;
        }

        public Criteria andCnncodeNotBetween(String value1, String value2) {
            addCriterion("CNNCODE not between", value1, value2, "cnncode");
            return (Criteria) this;
        }

        public Criteria andCnnnameIsNull() {
            addCriterion("CNNNAME is null");
            return (Criteria) this;
        }

        public Criteria andCnnnameIsNotNull() {
            addCriterion("CNNNAME is not null");
            return (Criteria) this;
        }

        public Criteria andCnnnameEqualTo(String value) {
            addCriterion("CNNNAME =", value, "cnnname");
            return (Criteria) this;
        }

        public Criteria andCnnnameNotEqualTo(String value) {
            addCriterion("CNNNAME <>", value, "cnnname");
            return (Criteria) this;
        }

        public Criteria andCnnnameGreaterThan(String value) {
            addCriterion("CNNNAME >", value, "cnnname");
            return (Criteria) this;
        }

        public Criteria andCnnnameGreaterThanOrEqualTo(String value) {
            addCriterion("CNNNAME >=", value, "cnnname");
            return (Criteria) this;
        }

        public Criteria andCnnnameLessThan(String value) {
            addCriterion("CNNNAME <", value, "cnnname");
            return (Criteria) this;
        }

        public Criteria andCnnnameLessThanOrEqualTo(String value) {
            addCriterion("CNNNAME <=", value, "cnnname");
            return (Criteria) this;
        }

        public Criteria andCnnnameLike(String value) {
            addCriterion("CNNNAME like", value, "cnnname");
            return (Criteria) this;
        }

        public Criteria andCnnnameNotLike(String value) {
            addCriterion("CNNNAME not like", value, "cnnname");
            return (Criteria) this;
        }

        public Criteria andCnnnameIn(List<String> values) {
            addCriterion("CNNNAME in", values, "cnnname");
            return (Criteria) this;
        }

        public Criteria andCnnnameNotIn(List<String> values) {
            addCriterion("CNNNAME not in", values, "cnnname");
            return (Criteria) this;
        }

        public Criteria andCnnnameBetween(String value1, String value2) {
            addCriterion("CNNNAME between", value1, value2, "cnnname");
            return (Criteria) this;
        }

        public Criteria andCnnnameNotBetween(String value1, String value2) {
            addCriterion("CNNNAME not between", value1, value2, "cnnname");
            return (Criteria) this;
        }

        public Criteria andCnnsortIsNull() {
            addCriterion("CNNSORT is null");
            return (Criteria) this;
        }

        public Criteria andCnnsortIsNotNull() {
            addCriterion("CNNSORT is not null");
            return (Criteria) this;
        }

        public Criteria andCnnsortEqualTo(BigDecimal value) {
            addCriterion("CNNSORT =", value, "cnnsort");
            return (Criteria) this;
        }

        public Criteria andCnnsortNotEqualTo(BigDecimal value) {
            addCriterion("CNNSORT <>", value, "cnnsort");
            return (Criteria) this;
        }

        public Criteria andCnnsortGreaterThan(BigDecimal value) {
            addCriterion("CNNSORT >", value, "cnnsort");
            return (Criteria) this;
        }

        public Criteria andCnnsortGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("CNNSORT >=", value, "cnnsort");
            return (Criteria) this;
        }

        public Criteria andCnnsortLessThan(BigDecimal value) {
            addCriterion("CNNSORT <", value, "cnnsort");
            return (Criteria) this;
        }

        public Criteria andCnnsortLessThanOrEqualTo(BigDecimal value) {
            addCriterion("CNNSORT <=", value, "cnnsort");
            return (Criteria) this;
        }

        public Criteria andCnnsortIn(List<BigDecimal> values) {
            addCriterion("CNNSORT in", values, "cnnsort");
            return (Criteria) this;
        }

        public Criteria andCnnsortNotIn(List<BigDecimal> values) {
            addCriterion("CNNSORT not in", values, "cnnsort");
            return (Criteria) this;
        }

        public Criteria andCnnsortBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("CNNSORT between", value1, value2, "cnnsort");
            return (Criteria) this;
        }

        public Criteria andCnnsortNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("CNNSORT not between", value1, value2, "cnnsort");
            return (Criteria) this;
        }

        public Criteria andCnnurlIsNull() {
            addCriterion("CNNURL is null");
            return (Criteria) this;
        }

        public Criteria andCnnurlIsNotNull() {
            addCriterion("CNNURL is not null");
            return (Criteria) this;
        }

        public Criteria andCnnurlEqualTo(String value) {
            addCriterion("CNNURL =", value, "cnnurl");
            return (Criteria) this;
        }

        public Criteria andCnnurlNotEqualTo(String value) {
            addCriterion("CNNURL <>", value, "cnnurl");
            return (Criteria) this;
        }

        public Criteria andCnnurlGreaterThan(String value) {
            addCriterion("CNNURL >", value, "cnnurl");
            return (Criteria) this;
        }

        public Criteria andCnnurlGreaterThanOrEqualTo(String value) {
            addCriterion("CNNURL >=", value, "cnnurl");
            return (Criteria) this;
        }

        public Criteria andCnnurlLessThan(String value) {
            addCriterion("CNNURL <", value, "cnnurl");
            return (Criteria) this;
        }

        public Criteria andCnnurlLessThanOrEqualTo(String value) {
            addCriterion("CNNURL <=", value, "cnnurl");
            return (Criteria) this;
        }

        public Criteria andCnnurlLike(String value) {
            addCriterion("CNNURL like", value, "cnnurl");
            return (Criteria) this;
        }

        public Criteria andCnnurlNotLike(String value) {
            addCriterion("CNNURL not like", value, "cnnurl");
            return (Criteria) this;
        }

        public Criteria andCnnurlIn(List<String> values) {
            addCriterion("CNNURL in", values, "cnnurl");
            return (Criteria) this;
        }

        public Criteria andCnnurlNotIn(List<String> values) {
            addCriterion("CNNURL not in", values, "cnnurl");
            return (Criteria) this;
        }

        public Criteria andCnnurlBetween(String value1, String value2) {
            addCriterion("CNNURL between", value1, value2, "cnnurl");
            return (Criteria) this;
        }

        public Criteria andCnnurlNotBetween(String value1, String value2) {
            addCriterion("CNNURL not between", value1, value2, "cnnurl");
            return (Criteria) this;
        }

        public Criteria andCnnflagIsNull() {
            addCriterion("CNNFLAG is null");
            return (Criteria) this;
        }

        public Criteria andCnnflagIsNotNull() {
            addCriterion("CNNFLAG is not null");
            return (Criteria) this;
        }

        public Criteria andCnnflagEqualTo(String value) {
            addCriterion("CNNFLAG =", value, "cnnflag");
            return (Criteria) this;
        }

        public Criteria andCnnflagNotEqualTo(String value) {
            addCriterion("CNNFLAG <>", value, "cnnflag");
            return (Criteria) this;
        }

        public Criteria andCnnflagGreaterThan(String value) {
            addCriterion("CNNFLAG >", value, "cnnflag");
            return (Criteria) this;
        }

        public Criteria andCnnflagGreaterThanOrEqualTo(String value) {
            addCriterion("CNNFLAG >=", value, "cnnflag");
            return (Criteria) this;
        }

        public Criteria andCnnflagLessThan(String value) {
            addCriterion("CNNFLAG <", value, "cnnflag");
            return (Criteria) this;
        }

        public Criteria andCnnflagLessThanOrEqualTo(String value) {
            addCriterion("CNNFLAG <=", value, "cnnflag");
            return (Criteria) this;
        }

        public Criteria andCnnflagLike(String value) {
            addCriterion("CNNFLAG like", value, "cnnflag");
            return (Criteria) this;
        }

        public Criteria andCnnflagNotLike(String value) {
            addCriterion("CNNFLAG not like", value, "cnnflag");
            return (Criteria) this;
        }

        public Criteria andCnnflagIn(List<String> values) {
            addCriterion("CNNFLAG in", values, "cnnflag");
            return (Criteria) this;
        }

        public Criteria andCnnflagNotIn(List<String> values) {
            addCriterion("CNNFLAG not in", values, "cnnflag");
            return (Criteria) this;
        }

        public Criteria andCnnflagBetween(String value1, String value2) {
            addCriterion("CNNFLAG between", value1, value2, "cnnflag");
            return (Criteria) this;
        }

        public Criteria andCnnflagNotBetween(String value1, String value2) {
            addCriterion("CNNFLAG not between", value1, value2, "cnnflag");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}